@extends('common.base-master')

@section('html-head')
    <!-- Bootstrap -->
    <script src="{{url('js/lib/bootstrap.min.js')}}"></script>
    <link href="{{url('css/newproject.css')}}" type="text/css" rel="stylesheet">
    <script src="{{url('js/search-project.js')}}"></script>
    <script src="{{url('js/lib/jquery.history.js')}}"></script>
@endsection

@section('html-body')
    <main>
        <div class="mainWrapp">
            @include('common.company-section')
            <div class="contain">
                <section class="nav_list">
                    <div>
                        <div class="list">
                            <span class="proList"><button class="clear"></button><p>移动<em class="close"></em></p><p>移动互<em class="close"></em></p><p>移动互联网<em class="close"></em></p></span>
                        </div>
                        <div class="search_info">
                            <input type="text" placeholder="请输入您要搜索的信息" />
                        </div>
                        <div class="row">
                            <nav>
                                <ul>
                                    <li><a href="javascript:void(0)" class="selected">状态</a></li>
                                    <li><a href="javascript:void(0)">轮段</a></li>
                                    <li><a href="javascript:void(0)">行业</a></li>
                                    <li><a href="javascript:void(0)">地区</a></li>
                                    <li><a href="javascript:void(0)">阶段</a></li>
                                    <li><a href="javascript:void(0)">时间</a></li>
                                </ul>
                            </nav>

                        </div>
                        <div class="filter-row">
                            <ul class="tab filter-1 hide" data-index="1">
                                <li><a href="{{route('Home.Project.Search')}}?{{http_build_query(array('stage'=>'','field'=>$keyword['field_key'],'phase'=>$keyword['phase_key'],'dist'=>$keyword['dist_key']))}}">全部</a></li>
                                <li><a href="{{route('Home.Project.Search')}}?{{http_build_query(array('stage'=>1,'field'=>$keyword['field_key'],'phase'=>$keyword['phase_key'],'dist'=>$keyword['dist_key']))}}">15天融资</a></li>
                                <li><a href="{{route('Home.Project.Search')}}?{{http_build_query(array('stage'=>2,'field'=>$keyword['field_key'],'phase'=>$keyword['phase_key'],'dist'=>$keyword['dist_key']))}}">正在融资</a></li>
                                <li><a href="{{route('Home.Project.Search')}}?{{http_build_query(array('stage'=>3,'field'=>$keyword['field_key'],'phase'=>$keyword['phase_key'],'dist'=>$keyword['dist_key']))}}">完成融资</a></li>
                            </ul>
                            <ul class="tab filter-2 hide" data-index="2">
                                <li name="phase"><a href="{{route('Home.Project.Search')}}?{{http_build_query(array('stage'=>$keyword['stage_key'],'field'=>$keyword['field_key'],'phase'=>'','dist'=>$keyword['dist_key']))}}">全部</a></li>
                                @foreach($phases as $phase)
                                    <li name="phase"><a href="{{route('Home.Project.Search')}}?{{http_build_query(array('stage'=>$keyword['stage_key'],'field'=>$keyword['field_key'],'phase'=>$phase->id,'dist'=>$keyword['dist_key']))}}">{{$phase->phase}}</a></li>
                                @endforeach
                            </ul>
                            <ul class="tab filter-3 hide" data-index="3">
                                <li name="field"><a href="{{route('Home.Project.Search')}}?{{http_build_query(array('stage'=>$keyword['stage_key'],'field'=>'','phase'=>$keyword['phase_key'],'dist'=>$keyword['dist_key']))}}">全部</a></li>
                            @foreach($fields as $field)
                                    <li name="field"><a href="{{route('Home.Project.Search')}}?{{http_build_query(array('stage'=>$keyword['stage_key'],'field'=>$field->id,'phase'=>$keyword['phase_key'],'dist'=>$keyword['dist_key']))}}">{{$field->field}}</a></li>
                                @endforeach
                            </ul>
                            <ul class="tab filter-4 hide" data-index="4">
                                <li name="district"><a href="{{route('Home.Project.Search')}}?{{http_build_query(array('stage'=>$keyword['stage_key'],'field'=>$keyword['field_key'],'phase'=>$keyword['phase_key'],'dist'=>''))}}">全部</a></li>
                            @foreach($districts as $district)
                                    <li name="district"><a href="{{route('Home.Project.Search')}}?{{http_build_query(array('stage'=>$keyword['stage_key'],'field'=>$keyword['field_key'],'phase'=>$keyword['phase_key'],'dist'=>urlencode($district->dist_name)))}}">{{$district->dist_name}}</a></li>
                                @endforeach
                            </ul>
                            <ul class="tab filter-5 hide" data-index="5">
                                <li><a href="#">DEMO</a></li>
                                <li><a href="#">研发中</a></li>
                                <li><a href="#">初上线</a></li>
                                <li><a href="#">运营中</a></li>
                                <li><a href="#">已盈利</a></li>
                            </ul>
                            <ul class="tab filter-6 hide" data-index="6">
                                <li><a href="#">时间</a></li>
                                <li><a href="#">时间</a></li>
                                <li><a href="#">时间</a></li>
                            </ul>
                        </div>
                    </div>
                </section>
                <section>
                    <h3>项目简介</h3>
                    <p class="count"><em>559729</em> \ 筛选结果</p>
                    <div>
                        <ul class="nav_tab">
                            <li class="desc">项目简介</li>
                            <li class="stage">融资阶段</li>
                            <li class="type">所属行业</li>
                            <li class="address">所在地区</li>
                            <li class="member">成员</li>
                        </ul>
                        <div class="content">
                            <ul>
                                @if($projects)
                                    @foreach($projects as $project)
                                        <li>
                                            <dl>
                                                <dt>
                                                    <a href="{{route('Home.Project.getProjectById' , ['id'=>$project->id])}}"><img src="{{route('Api.ProjectLogo.Show' , ['id'=>$project->id])
										}}" /></a>
                                                </dt>
                                                <dd class="commpany">
                                                    <p><a href="{{route('Home.Project.getProjectById' , ['id'=>$project->id])}}"><strong>{{$project->project_name}}</strong></a></p>
                                                    <p>{{$project->project_intro}}</p>
                                                </dd>
                                                <dd class="list">
                                                    <div class="list_content">
                                                        <p class="stage"><em class="reveal">融资阶段</em>
                                                            @if($phase = $project->toPhase)
                                                                <em class="floatR">{{$phase->phase}}</em>
                                                            @endif
                                                        </p>
                                                        <p class="type"><em class="reveal">所在行业</em>
                                                            @if($fields = $project->project_x_fields)
                                                                @foreach($fields as $field)
                                                                    <em class="floatR">{{$field->field}}</em>
                                                                @endforeach
                                                            @endif
                                                        </p>
                                                        <p class="address"><em class="reveal">所在地区</em>
                                                            @if($project->province || $project->city)
                                                                <em class="floatR">{{$project->province}}{{$project->city}}</em>
                                                            @endif
                                                        </p>
                                                        <p class="member">
                                                            @if($members = $project->project_x_team)
                                                                @foreach($members as $member)
                                                                    <em class="reveal">{{$member->real_name}}</em>
                                                                @endforeach
                                                            @endif
                                                        </p>
                                                    </div>
                                                </dd>
                                            </dl>
                                        </li>
                                    @endforeach
                                @endif
                            </ul>
                        </div>
                    </div>
                </section>
            </div>
        </div>
    </main>
@endsection